<?php
require "../common.php";
if ($_POST) {
    $title = $_POST['title'];
    $content = $_POST['content'];
    $time = time();
    $mysqli->query("insert into `article` (`title`,`content`,`time`) values ('$title','$content','$time')");
    echo "<script>alert('发布成功！');location.href='article.php'</script>";
}

require "templates/add.html";

